import request from '@/utils/request'

export function fetchList(params) {
    return request({
        url: '/ad/list',
        method: 'get',
        params: params
    })
}
export function getData(id) {
  return request({
    url: '/ad/'+id,
    method: 'get'
  })
}

export function addData(data) {
  return request({
    url: '/ad/add',
    method: 'post',
    data: data
  })
}

export function deleteData(params) {
  return request({
    url: '/ad/delete',
    method:'delete',
    params:params
  })
}

export function updateData(id,data) {
  return request({
    url: '/ad/' + id,
    method: 'put',
    data: data
  })
}
